@extends('admin.common.admin_main')
@section('container')
<div class="uc-body">
    <div class="uc-head">
        <ul>
            <li>
                <span class="sel">
                    业主信息
                </span>
                @if ($dataInfo['auth_status'] == 0)
                <span class="text-disabled">(未认证)</span>
                @elseif($dataInfo['auth_status'] == 1)
                <span class="text-warning">(认证中)</span>
                @elseif($dataInfo['auth_status'] == 3)
                <span class="text-success">(已认证)</span>
                @elseif($dataInfo['auth_status'] == 2)
                <span class="text-danger">(认证未通过)</span>
                @endif
            </li>
        </ul>
        <div class="fr">
            <a class="btn btn-warning" href="/user/company?type=2">取消编辑</a>
        </div>
    </div>
    <div class="form form-table">
        <div class="form-body">
            <div class="row">
                <label class="col-1 control-label request-label" for="company_name">单位名称</label>
                <div class="col-3">
                    <input id="company_name" class="form-control" type="text" value="{{$dataInfo['company_name']}}">
                </div>
                <label class="col-1 control-label" for="company_type_id">单位性质</label>
                <div class="col-3">
                    <select class="form-control" id="company_type_id">
                        @forelse ($company_type_list as $key=>$value)
                        <option value="{{$key}}" {{$dataInfo['company_type_id']==$key?"selected=selected":""}}>{{$value}}</option>
                        @empty
                        @endforelse
                    </select>
                </div>
                <label class="col-1 control-label">单位Logo</label>
                <div class="col-3 j_fileUpload">
                    <div class="static fl">
                        @if ($dataInfo['logo_info'])
                            <a class="j_fileUrl" data-href="{{$dataInfo['logo_info'][0]['url']}}">{{$dataInfo['logo_info'][0]['name']}}</a>
                        @else
                            <a class="j_fileUrl"></a>
                        @endif
                    </div>
                    <div class="file_select">
                        <div class="static">
                            @if ($dataInfo['logo_info'])
                                <a class="btn btn-small btn-primary j_fileTxt" data-txt="修改LOGO">修改LOGO</a>
                                <input class="txt_file j_fileSelect" name="files" type="file" id="logo_info">
                                <input class="j_name" type="hidden" id="logo_img_name" value="{{$dataInfo['logo_info'][0]['name']}}">
                                <input class="j_url" type="hidden" id="logo_img_url" value="{{$dataInfo['logo_info'][0]['url']}}">
                                <input class="j_md5" type="hidden" id="logo_img_md5" value="{{$dataInfo['logo_info'][0]['md5']}}">
                                <input class="j_thumbUrl" type="hidden" id="logo_img_thumbUrl" value="{{$dataInfo['logo_info'][0]['thumbUrl']}}">
                            @else
                                <a class="btn btn-small btn-primary j_fileTxt" data-txt="上传文件">上传LOGO</a>
                                <input class="txt_file j_fileSelect" name="files" type="file" id="logo_info">
                                <input class="j_name" type="hidden" id="logo_img_name" >
                                <input class="j_url" type="hidden" id="logo_img_url" >
                                <input class="j_md5" type="hidden" id="logo_img_md5" >
                                <input class="j_thumbUrl" type="hidden" id="logo_img_thumbUrl">
                            @endif
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <label class="col-1 control-label">法人代表</label>
                <div class="col-3">
                    <input class="form-control" type="text" id="legan_user_name" value="{{$dataInfo['legan_user_name']}}">
                </div>
                <label class="col-1 control-label">联系电话</label>
                <div class="col-3">
                    <input class="form-control" type="text" id="legan_user_phone" value="{{$dataInfo['legan_user_phone']}}">
                </div>
                <label class="col-1 control-label">联系邮箱</label>
                <div class="col-3">
                    <input class="form-control" type="text" id="legan_user_email" value="{{$dataInfo['legan_user_email']}}">
                </div>
            </div>
            <div class="row">
                <label class="col-1 control-label">注册时间</label>
                <div class="col-3">
                    <input class="form-control j_dateSelect" type="text" readonly id="company_regist_date" value="{{$dataInfo['company_regist_date']}}">
                </div>
                <label class="col-1 control-label">注册资本</label>
                <div class="col-3">
                    <input class="form-control form-control-sm" type="text" placeholder="万元" id="company_regist_money" value="{{$dataInfo['company_regist_money']}}">
                    <select id="company_regist_money_type" class="form-control">
                        <option value="1" {{$dataInfo['company_regist_money_type']==1?"selected=selected":""}}>人民币</option>
                        <option value="2" {{$dataInfo['company_regist_money_type']==2?"selected=selected":""}}>美元</option>
                    </select>
                </div>
            </div>
            <div class="row">
                <label class="col-1 control-label">注册地址</label>
                <div class="col-11">
                    <select class="form-control" id="reg_province">
                        <option value="">请选择</option>
                        @forelse ($province_list as $key=>$value)
                        <option value="{{$value['id']}}" {{$value['id']==$p?"selected=selected":""}}>{{$value['name']}}</option>
                        @empty
                        @endforelse
                    </select>
                    <select class="form-control" id="reg_city">
                        <option value="">请选择</option>
                        @forelse ($city_list as $key=>$value)
                        <option value="{{$value['id']}}" {{$value['id']==$c?"selected=selected":""}}>{{$value['name']}}</option>
                        @empty
                        @endforelse
                    </select>
                    <select class="form-control" id="reg_district">
                        <option value="">请选择</option>
                        @forelse ($area_list as $key=>$value)
                        <option value="{{$value['id']}}" {{$value['id']==$a?"selected=selected":""}}>{{$value['name']}}</option>
                        @empty
                        @endforelse
                    </select>
                    <input class="form-control" size="60" type="text" placeholder="" id="company_regist_address" value="{{$dataInfo['company_regist_address']}}">
                </div>
            </div>
            <div class="row">
                <label class="col-1 control-label request-label">联系人</label>
                <div class="col-3">
                    <input class="form-control" type="text" placeholder="" id="contact_user_name" value="{{$dataInfo['contact_user_name']}}">
                </div>
                <label class="col-1 control-label request-label">联系手机</label>
                <div class="col-3">
                    <input class="form-control" type="text" placeholder="" id="contact_user_phone" value="{{$dataInfo['contact_user_phone']}}">
                </div>
                <label class="col-1 control-label">固定电话</label>
                <div class="col-3">
                    <input class="form-control" type="text" placeholder="含区号" id="fix_phone" value="{{$dataInfo['fix_phone']}}">
                </div>
            </div>
            <div class="row">
                <label class="col-1 control-label">传真号码</label>
                <div class="col-3">
                    <input class="form-control" type="text" placeholder="含区号" id="fix_number" value="{{$dataInfo['fix_number']}}">
                </div>
                <label class="col-1 control-label request-label">Email</label>
                <div class="col-3">
                    <input class="form-control" type="text" placeholder="" id="contact_user_email" value="{{$dataInfo['contact_user_email']}}">
                </div>
                <label class="col-1 control-label">邮编</label>
                <div class="col-3">
                    <input class="form-control" type="text" placeholder="" id="zip_code" value="{{$dataInfo['zip_code']}}">
                </div>
            </div>
            <div class="row">
                <label class="col-1 control-label request-label">通信地址</label>
                <div class="col-11">
                    <select class="form-control" id="contact_province">
                        <option value="">请选择</option>
                        @forelse ($province_list as $key=>$value)
                        <option value="{{$value['id']}}" {{$value['id']==$p1?"selected=selected":""}}>{{$value['name']}}</option>
                        @empty
                        @endforelse
                    </select>
                    <select class="form-control" id="contact_city">
                        <option value="">请选择</option>
                        @forelse ($city_list1 as $key=>$value)
                        <option value="{{$value['id']}}" {{$value['id']==$c1?"selected=selected":""}}>{{$value['name']}}</option>
                        @empty
                        @endforelse
                    </select>
                    <select class="form-control" id="contact_district">
                        <option value="">请选择</option>
                        @forelse ($area_list1 as $key=>$value)
                        <option value="{{$value['id']}}" {{$value['id']==$a1?"selected=selected":""}}>{{$value['name']}}</option>
                        @empty
                        @endforelse
                    </select>
                    <input class="form-control" size="60" type="text" placeholder="" id="contact_user_address" value="{{$dataInfo['contact_user_address']}}">
                </div>
            </div>
            <div class="row">
                <label class="col-1 control-label">所属行业</label>
                <div class="col-10">
                    <textarea class="form-control form-control-text" id="company_industry">{{$dataInfo['company_industry']}}</textarea>
                </div>
            </div>
            <div class="row">
                <label class="col-1 control-label">单位简介</label>
                <div class="col-10">
                    <textarea class="form-control form-control-text" id="company_desc">{{$dataInfo['company_desc']}}</textarea>
                </div>
            </div>
            <div class="row">
                <label class="col-2 control-label">组织机构代码</label>
                <div class="col-4">
                    <input id="organize_code" class="form-control" size="40" type="text" value="{{$dataInfo['organize_code']}}">
                </div>
                <label class="col-3 control-label">组织机构代码（扫描件）</label>
                <div class="col-3 j_fileUpload">
                    <div class="static fl">
                        @if ($dataInfo['organize_code_file'])
                            <a class="j_fileUrl" data-href="{{$dataInfo['organize_code_file'][0]['url']}}">{{$dataInfo['organize_code_file'][0]['name']}}</a>
                        @else
                            <a class="j_fileUrl"></a>
                        @endif
                    </div>
                    <div class="file_select">
                        <div class="static">
                            @if ($dataInfo['organize_code_file'])
                                <a class="btn btn-small btn-primary j_fileTxt" data-txt="修改文件">修改文件</a>
                                <input class="txt_file j_fileSelect" name="files" type="file" id="organize_info">
                                <input class="j_name" type="hidden" id="organize_img_name" value="{{$dataInfo['organize_code_file'][0]['name']}}">
                                <input class="j_url" type="hidden" id="organize_img_url" value="{{$dataInfo['organize_code_file'][0]['url']}}">
                                <input class="j_md5" type="hidden" id="organize_img_md5" value="{{$dataInfo['organize_code_file'][0]['md5']}}">
                                <input class="j_thumbUrl" type="hidden" id="organize_img_thumbUrl" value="{{$dataInfo['organize_code_file'][0]['thumbUrl']}}">
                            @else
                                <a class="btn btn-small btn-primary j_fileTxt" data-txt="上传文件">上传文件</a>
                                <input class="txt_file j_fileSelect" name="files" type="file" id="organize_info">
                                <input class="j_name" type="hidden" id="organize_img_name" >
                                <input class="j_url" type="hidden" id="organize_img_url" >
                                <input class="j_md5" type="hidden" id="organize_img_md5" >
                                <input class="j_thumbUrl" type="hidden" id="organize_img_thumbUrl">
                            @endif
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <label class="col-2 control-label">营业执照注册号</label>
                <div class="col-4">
                    <input id="organize_regist_number" class="form-control" size="40" type="text" value="{{$dataInfo['organize_regist_number']}}">
                </div>
                <label class="col-3 control-label">营业执照注册号（扫描件）</label>
                <div class="col-3 j_fileUpload">
                    <div class="static fl">
                        @if ($dataInfo['organize_regist_number_file'])
                            <a class="j_fileUrl" data-href="{{$dataInfo['organize_regist_number_file'][0]['url']}}">{{$dataInfo['organize_regist_number_file'][0]['name']}}</a>
                        @else
                            <a class="j_fileUrl"></a>
                        @endif
                    </div>
                    <div class="file_select">
                        <div class="static">
                            @if ($dataInfo['organize_regist_number_file'])
                                <a class="btn btn-small btn-primary j_fileTxt" data-txt="修改文件">修改文件</a>
                                <input class="txt_file j_fileSelect" name="files" type="file" id="number_info">
                                <input class="j_name" type="hidden" id="number_img_name" value="{{$dataInfo['organize_regist_number_file'][0]['name']}}">
                                <input class="j_url" type="hidden" id="number_img_url" value="{{$dataInfo['organize_regist_number_file'][0]['url']}}">
                                <input class="j_md5" type="hidden" id="number_img_md5" value="{{$dataInfo['organize_regist_number_file'][0]['md5']}}">
                                <input class="j_thumbUrl" type="hidden" id="number_img_thumbUrl" value="{{$dataInfo['organize_regist_number_file'][0]['thumbUrl']}}">
                            @else
                                <a class="btn btn-small btn-primary j_fileTxt" data-txt="上传文件">上传文件</a>
                                <input class="txt_file j_fileSelect" name="files" type="file" id="number_info">
                                <input class="j_name" type="hidden" id="number_img_name" >
                                <input class="j_url" type="hidden" id="number_img_url" >
                                <input class="j_md5" type="hidden" id="number_img_md5">
                                <input class="j_thumbUrl" type="hidden" id="number_img_thumbUrl">
                            @endif
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-offset-1 col-10">
                    <a class="btn btn-warning j_proprietorSave" data-chk="2">提交认证</a>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

@section('script')
<script src="{{env('STATIC_PATH')}}/libs/datetimepicker.js"></script>
<script src="{{env('STATIC_PATH')}}/libs/ajaxfileupload.js"></script>
<script src="{{env('STATIC_PATH')}}/js/user_proprietor.js"></script>
@endsection
